package com.zjht.gmcc.bean.model;

import com.zjht.gmcc.bean.util.MyFormat;

/**
 * CM_FeedBackCode表：集团反馈文件代码表
 * @author dyh 2009-12-15
 */
public class CM_FeedBackCode implements java.io.Serializable {
	private static final long serialVersionUID = 1715715983706148053L;
	private String code;
	private String name;
	private String type;
	private String reason;
	private String info;
	private boolean hasdetail;
	private String memo;
	private String doinfo;
	private boolean doflag;

	public CM_FeedBackCode() {
	}

	public CM_FeedBackCode(String code, String type, String reason, String info, String hasdetail, String memo, String name, String doflag,
			String doinfo) {
		setCode(code);
		setType(type);
		setReason(MyFormat.formatStr(reason));
		setInfo(MyFormat.formatStr(info));
		setHasdetail(hasdetail);
		setMemo(MyFormat.formatStr(memo));
		setName(MyFormat.formatStr(name));
		setDoflag(doflag);
		setDoinfo(MyFormat.formatStr(doinfo));
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	public boolean isHasdetail() {
		return hasdetail;
	}

	public void setHasdetail(boolean hasdetail) {
		this.hasdetail = hasdetail;
	}

	public void setHasdetail(String hasdetail) {
		this.hasdetail = "1".equals(hasdetail);
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public String getTypename() {
		return getTypename(this.type);
	}

	// 1-成功,2-待处理,3-失败,4-滚动比对沉淀
	public String getTypename(String type) {
		String typename = "";
		if ("1".equals(type))
			typename = "处理成功";
		else if ("2".equals(type))
			typename = "入集团临时库待处理";
		else if ("3".equals(type))
			typename = "处理失败";
		else if ("4".equals(type))
			typename = "滚动比对沉淀";
		return typename;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDoinfo() {
		return doinfo;
	}

	public void setDoinfo(String doinfo) {
		this.doinfo = doinfo;
	}

	public boolean isDoflag() {
		return doflag;
	}

	public void setDoflag(boolean doflag) {
		this.doflag = doflag;
	}

	public void setDoflag(String doflag) {
		this.doflag = "1".equals(doflag);
	}
}